<template>
  <span :value="value">{{ filterModelParam }}</span>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'FilterModelParam',
  props: {
    value: [String, Number]
  },
  data() {
    return {
      modelparam: []
    }
  },

  computed: {
    filterModelParam() {
      this.modelparam = this.modelParam
      if (!this.modelparam) {
        return this.value
      }
      for (let i = 0; i < this.modelparam.length; i++) {
        if (this.value === this.modelparam[i].PARAM_ID) {
          return this.modelparam[i].PARAM_NAME
        }
      }
      return this.value
    },
    ...mapGetters(['modelParam'])
  },

  methods: {}
}
</script>

<style scoped>
</style>
